import 'package:flutter/material.dart';

import '../../../../helper/utils/util.dart';
import 'controller.dart';

class LoginPwdPage extends GetView<LoginPwdController> {
  const LoginPwdPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: detailAppBar(context, title: '设置密码'),
      backgroundColor: Colors.white,
      body: Column(
        children: [
          Container(
            padding: EdgeInsets.all(10.r),
            color: Colors.lightBlue[50],
            child: Text(
              '设置规则为：①密码长度8--16位；②密码必须包含数字、大小写字母、特殊字符中至少3种且不少于8位。',
              style: TextStyle(color: ColorsUtil.blue, fontSize: 15.sp),
            ),
          ),
          // Text(
          //   '当前手机号${controller.state.phone.phone}',
          //   style: TextStyle(color: const Color(0xff333333), fontSize: 17.sp),
          // ),
          // SizedBox(
          //   height: 10.r,
          // ),
          Padding(
            padding: EdgeInsets.symmetric(horizontal: 20.r),
            child: Column(
              children: [
                UITextField(
                  title: '原密码',
                  hintText: '填写原密码',
                  onChanged: (value) {
                    controller.state.old = value;
                  },
                  style: TextFieldStyle.underLine,
                  // titleStyle: ITheme().title21_bold,
                ),
                UITextField(
                  title: '新密码',
                  hintText: '填写新密码',
                  onChanged: (value) {
                    controller.state.newPwd = value;
                  },
                  maxLengthWithoutCounter: 16,
                  style: TextFieldStyle.underLine,
                ),
                UITextField(
                  title: '确认密码',
                  hintText: '再次填写确认',
                  onChanged: (value) {
                    controller.state.newPwd1 = value;
                  },
                  maxLengthWithoutCounter: 16,
                  style: TextFieldStyle.underLine,
                ),
                SizedBox(
                  height: 30.w,
                ),
                ExpandedFilledButton(
                  text: '确认',
                  onPressed: controller.sure,
                  backgroundColor: ColorsUtil.blue,
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}
